package com.hopital5.zhangyz.vo.response;

import com.hopital5.zhangyz.model.ActivityActivityItem;

import com.hopital5.zhangyz.model.ActivityItem;
import com.hopital5.zhangyz.model.People;
import lombok.Builder;
import lombok.Data;

import java.math.BigDecimal;

@Data
@Builder
public class ActivityActivityItemVoResponse {
    private Long id;
    private ActivityItemVoResponse activityItem;
    private PeopleVoResponse people;
    private BigDecimal number;

    public static ActivityActivityItemVoResponse build(ActivityActivityItem activityActivityItem) {
        ActivityActivityItemVoResponse activityActivityItemVoResponse = ActivityActivityItemVoResponse.builder()
                .id(activityActivityItem.getId())
                .activityItem(ActivityItemVoResponse.build(activityActivityItem.getActivityItem()))
                .people(PeopleVoResponse.build(activityActivityItem.getPeople()))
                .number(activityActivityItem.getNumber())
                .build();
        return activityActivityItemVoResponse;
    }

}
